import path from "path";
import { app } from "electron";

export const sleep = (wait) => {
  return new Promise((resolve, reject) => {
    setTimeout(() => {
      resolve();
    }, wait);
  });
};

export const getExtraFiles = () => {
  // 获取Resources路径
  let resourcesPath = app.getAppPath();
  if (app.isPackaged) {
    resourcesPath = process.resourcesPath;
  }
  const extraFiles = path.join(resourcesPath, "extra-files"); // 额外资源存储路径
  return extraFiles;
};
